Skip to content

fix(os-apps): fail install when a required WASM module artifact is missing (ARN-61/ARN-273) - #408

Draft
rita-aga wants to merge 1 commit into
mainfrom
claude/arn61-apprequired-fail-fast
Draft

fix(os-apps): fail install when a required WASM module artifact is missing (ARN-61/ARN-273)#408
rita-aga wants to merge 1 commit into
mainfrom
claude/arn61-apprequired-fail-fast

Conversation

@rita-aga

Copy link
Copy Markdown
Collaborator

Why

ARN-273: prod file reads flapped 503 across all file ids because a published Genesis paw-fs version shipped without the blob_adapter WASM binary (an app-required module). The runtime installed the incomplete bundle anyway, marked the app healthy, and blob_adapter then lazy-flapped Configured required WASM module artifact is missing from the app bundle at request time — taking down Files('…')/$value. Same shape as ARN-61 (paw-channels missing channel_connect/transport_reconcile).

Root cause of the silent outage: install_os_app_with_plan (temper-platform/src/os_apps/mod.rs) logged an error! for a missing required module but still returned Ok(InstallResult{…}), then went on to bootstrap the App entity and record install metadata. A broken required module became a silent, self-healing-into-a-loop prod outage instead of a loud failure.

What

Fail activation when any declared platform-required / app-required module has no artifact in the bundle:

  • Collect missing_required_modules in the existing missing-artifact loop.
  • After the wasm phase, if that set is non-empty (and plan.wasm), return Err(String)before the App entity is bootstrapped and before install metadata is recorded — so the app is never marked installed/healthy with a broken required module.
  • The error surfaces through install-from-genesis (and reconcile_os_app propagates it via ?). At startup bootstrap the error is swallowed-but-logged, which is the desired behavior: a reinstall of an incomplete pinned ref now fails and preserves the last good durable installed record across restart instead of clobbering it (directly addresses the ARN-61 restart-revert).
  • Optional modules are unchanged — they still only warn and the install proceeds.

Tests

  • test_install_fails_when_app_required_wasm_missing — app-required artifact missing → activation errors, naming the module.
  • test_install_proceeds_when_optional_wasm_missing — optional artifact missing → install proceeds.

Local: cargo fmt --check clean; cargo clippy -p temper-platform clean; full os_apps module suite (84 tests) + the two new tests pass. Full-workspace pre-push gates deferred to CI (draft).

Scope note

This is the durable class fix for ARN-61/ARN-273. The immediate ARN-273 prod incident was separately resolved by publishing complete paw-fs/paw-channels bundles to Genesis and hot-installing them (verified: install lists all modules, 20/20 $value probes 200, Datadog clean) — independent of this PR. Draft for review; do not merge/deploy without owner sign-off.

Refs ARN-61, ARN-273.

…ssing (ARN-61/ARN-273)

install_os_app_with_plan previously logged an error when a declared
platform-required/app-required WASM module had no artifact in the bundle,
but still returned Ok(InstallResult) — the app was bootstrapped and marked
installed, then the missing module lazy-flapped 503s at request time
("Configured required WASM module artifact is missing from the app bundle").
This is what took paw-fs/blob_adapter down on prod (Files/$value 503s) after a
Genesis version was published without the blob_adapter binary.

Refuse activation instead: collect required modules missing an artifact and,
after the wasm phase, return Err before the App entity is bootstrapped and
before install metadata is recorded. The error surfaces through
install-from-genesis (and is swallowed-but-logged at startup bootstrap, so a
good durable installed record is preserved across restart rather than clobbered
by a reinstall of an incomplete pinned ref). Optional modules still only warn.

Tests: app-required artifact missing -> activation errors; optional artifact
missing -> install proceeds.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NEWiRhC3UxsAzCMYxqV5FZ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant